package help;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.io.IOException;
import java.net.URL;
import javax.swing.JTextPane;
import javax.swing.JLabel;

import errors.NoSuchFile;

public class HelpWindow extends JFrame{

	private JFrame jFrame = null;  //  @jve:decl-index=0:visual-constraint="354,30"
	private JPanel jContentPane = null;
	private JTextPane jTextPane = null;
	private JLabel jLabel = null;

	public HelpWindow(){
		setContentPane(getJContentPane());
		URL url = null;
		url = HelpWindow.class.getResource("index.html");
		try {
			jTextPane.setPage(url);
		} catch (IOException e) {
			try {
				throw new errors.NoSuchFile();
			} catch (NoSuchFile e1) {
			}
		}
	}
	
	/**
	 * This method initializes jFrame	
	 * 	
	 * @return javax.swing.JFrame	
	 */
	private JFrame getJFrame() {
		if (jFrame == null) {
			jFrame = new JFrame();
			jFrame.setTitle("Help");
			jFrame.setSize(new Dimension(400, 500));
			jFrame.setContentPane(getJContentPane());
		}
		return jFrame;
	}

	/**
	 * This method initializes jContentPane	
	 * 	
	 * @return javax.swing.JPanel	
	 */
	private JPanel getJContentPane() {
		if (jContentPane == null) {
			jLabel = new JLabel();
			jContentPane = new JPanel();
			jContentPane.setLayout(new BorderLayout());
			jContentPane.add(getJTextPane(), BorderLayout.CENTER);
		}
		return jContentPane;
	}

	/**
	 * This method initializes jTextPane	
	 * 	
	 * @return javax.swing.JTextPane	
	 */
	private JTextPane getJTextPane() {
		if (jTextPane == null) {
			jTextPane = new JTextPane();
		}
		return jTextPane;
	}

}
